import React from 'react'
import Admin from './pages/Admin'
import Login from './pages/Login'
import { Switch, Route, Redirect } from 'react-router-dom'
import { Provider } from 'react-redux'
import { store } from './store'

export default function App() {
  return (<Provider store={store}>
    <div>
      {/* 配置路由 */}
      <Switch>
        <Route path='/admin' component={Admin} />
        <Route path='/login' component={Login} />
        <Redirect from='/' to='/admin' />
      </Switch>
    </div>
  </Provider>

  )
}
